package net.html;

import javax.swing.JEditorPane;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.WindowConstants;

public class HomePage
{
	public static void main(String[] args)
	{
		JEditorPane jep = new JEditorPane();
		jep.setEditable(false);
		try
		{
			jep.setPage("http://www.qq.com");
		}
		catch (Exception e)
		{
			jep.setContentType("text/html");
			jep.setText("<html>can not load</html>");
		}
		JScrollPane scrollPane = new JScrollPane(jep);
		JFrame jFrame = new JFrame("home page");
		jFrame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
		jFrame.setContentPane(scrollPane);
		jFrame.setSize(512,342);
		jFrame.setVisible(true);
	}
}
